package com.kai.steering.data.service.databus.enums;

public enum CanUsedExceptionEnum {
    TEST_EXCEPTION(0,"试卷异常");
    private int code;
    private String value;

    CanUsedExceptionEnum(int code, String value) {
        this.code=code;
        this.value=value;
    }

    public int getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
    public static Integer getCodeByBool(boolean bool) {
        for (UsableEnum type : UsableEnum.values()) {
            if (type.isBool() == bool) {
                return type.getCode();
            }
        }
        return null;
    }

    public static String getValueByCode(int code) {
        for (UsableEnum type : UsableEnum.values()) {
            if (type.getCode() == code) {
                return type.getValue();
            }
        }
        return null;
    }
}
